package BC99_序列中整数去重;

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

        ArrayList<Integer> list = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            list.add(sc.nextInt());
        }
        ArrayList<Integer> toList = new ArrayList<>();
        for (int i = 0; i < n; i++) {
            if (!toList.contains(list.get(i))){
                toList.add(list.get(i));
            }
        }
        for (Integer e : toList){
            System.out.printf(e + " ");
        }


    }
}
